package cn.whuc.scala.functional

object Simple {
  def main(args: Array[String]): Unit = {
    def fun1(name: String): String = {
      return "欢迎" + name
    }

    def fun2(name: String): String = {
      "欢迎" + name
    }

    def fun3(name: String): String =
      "欢迎" + name

    def fun4(name: String) = "欢迎" + name

    def fun5()= println("fun5")
    def fun6= println("fun6")

    println(fun4("zs"))

    fun5()

    fun6

    // 匿名函数
//    () => println("")

   def fun(x:Int,y:Int) :Int = {return x+y}

    def fun7(x:Int,y:Int):Int = {
      return x+y
    }

    val f8 = fun7 _

    println(f8(1,2))
    println(f8)


  }

}
